MenuBar 1.02

by Graham Crow

The popular pull-down menu system

MenuBar is a convenient way of accessing often-used directories, applications and files. In operation it is similar to the Filer and the Pinboard, but it is presented as a slim bar of pull-down menus at the top of the screen, complementing the icon bar at the bottom. Menus may be dragged or clicked open and shut. The Menu bar may contain up to ten menus, each with up to 30 objects (i.e. directories, applications or files). It is very simple to add, reposition and remove objects or Menus.

MenuBar allows you to organise files to suit the way you work, regardless of the way they are stored on disc. Each Menu may be given a name so that, for example, you could arrange for DTP to hold Printers, Style, MultiChrs and a data directory. Or you might have Tools containing Measure, CloseFile, WimpAid, Pointer, Flags, Magnifier, etc. A third might contain WIP: work in progress. It's up to you! The important point is that all these objects can be run from within MenuBar by double-clicking or dragging.

Moreover, the Menus are instantly available: no frustrating delays while you dig deep into the Filer hierarchy waiting for all the icons to be read. By including MenuBar in your Boot sequence your most important files are available from the MenuBar on start-up, and no need for any more messy backdrops!

MenuBar requires RISC OS 3.1 or greater. It works with hard or floppy discs.

To avoid confusion, this User Guide has a capital 'M' for Menus on the MenuBar, while the application's conventional menu is in lower-case.

Getting started

Copy MenuBar to any directory on your hard disc, preferably one from which it will be launched automatically each time you switch on the computer. If you are unsure how to do this please refer to the RISC OS 3 User Guide. Alternatively, simply double-click on the MenuBar icon in the usual way. MenuBar is launched, and the bar appears at the top of the screen, initially comprising five empty Menus. There is no icon bar icon.

A short tutorial

Suppose you want to use the first Menu to hold some favourite applications. To give the Menu a more meaningful name, click the middle mouse button while the pointer is over the title bar of Menu 1. Now slide off Menu 1 -> Name and replace the current name with Applications. The new name remains in light grey to indicate that the Menu is still empty.

To add some applications to the Menu simply drag them from a Filer window, singly or as a selection. The Menu opens to accommodate the items and its name changes to red. As with the Filer, the items may be double-clicked to execute them or dragged to any relevant place on the Desktop.

Continue to build the other Menus in the same way and when you are satisfied, save the data by choosing All Menus -> Save as data. Next time you run MenuBar the data will automatically be loaded.

The objects in a Menu (ie. directories, applications or files) may be treated in a variety of ways and these are detailed later. Similarly, the actions which may be performed on the Menus are accounted for below. First, however, MenuBar's own menu is described.

MenuBar menu

Click the menu button to display the menu. The main menu is in two parts. Above the dotted line are items for All Menus, Menu '<this menu>', and File/Dir./App. '<this item>'. The text of the second two depends on the pointer position when you click menu. Below the dotted line are the usual Info and Quit, together with Choices and Help which are explained later. If changes have been made an asterisk appears in the menu title, and if you attempt to quit with unsaved data a warning is issued.

Objects (directories, applications or files)

Add objects

To add objects (directories, applications or files) to a Menu, drag them from a Filer window, either individually or as a selection. The maximum number of objects per menu is 30, and if you attempt to exceed this a warning buzz sounds. The same object may be added to more than one Menu, though it is naturally not possible to have the same object more than once on a single menu.

Select objects

As with the Filer, clicking Select on an object selects it and clicking Adjust allows additional objects to be selected/deselected. Alternatively, use drag with Select or Adjust on the background (left edge of object name) to select/deselect a group of objects. All the objects in a Menu may be selected and cleared in one go by making the appropriate choice from the icon bar menu.

Making selections is useful if you want to execute several objects at once. For example, you might select all the objects in your DTP Menu in order to run them all with a single drag to the icon bar. Or you might want to remove several objects from a Menu.

Remove objects

To remove an object (or a selection) click menu on it and choose Remove from the object menu. This does not, of course, delete the object from your disc.

Move objects

To reposition an object (or a selection) within a Menu drag the source object and drop it on the destination object. Any intermediate objects are shunted up or down to make space. If you drag a selection in this way, only the individual object under the pointer is moved.

Drag objects

A single object or a selection of objects may be dragged:

Dragging with Shift held down removes the object from the Menu after the drag is completed (but never deletes the source). Dragging with Adjust closes the Menu when the operation is complete.

Execute objects by double-clicking

Double-clicking Select on an object opens directories and runs files or applications, as with the Filer. To open an application directory, hold down shift and double-click Select. Double-clicking with Adjust closes the Menu afterwards.

Object information

To find out more about an object click the menu button on it and slide off the object name. You can then slide off Pathname or Info.

Find objects

Slide off All Menus -> Find leaf or All Menus -> Find path and enter the search string. Press Return and a search will be made of all the Menus for any objects containing the search string. Depending on the menu choice the search will include the whole pathname or be confined to the leafname. The search ignores case. Any matching objects are highlighted and their Menus fully opened. Menus which do not contain the search string are closed.

Object not found

If, having placed an object in a Menu, you subsequently move, delete or rename that object, then MenuBar will be unable to locate it. In this case the drag icon will be replaced by a red cross. If you subsequently re-launch MenuBar then the file icon will also be replaced by a red cross. Executing such an object produces a warning buzz.

Open Filer

To open the Filer window of the directory containing a Menu object, click the menu button on it and slide off the object name. Then choose Open Filer.

Launch Applications and load data file simultaneously

When you double-click on a file, MenuBar broadcasts a message to all the active tasks to see whether any of them wishes to load it. For example, double-clicking on a Sprite file will probably load it into Paint. If Paint is not active, then it will be installed before the data is loaded. Sometimes, however, you specifically want to load the file into a different Application. You may, for instance, wish to load the Sprite file into Ovation.

You can achieve this with MenuBar by holding down Alt and dragging a suitable file to an Application on a Menu. The file may be dragged from another Menu or from a Filer window. Note that this feature depends on MenuBar being able to identify the task name (as displayed in the task window) from the application's filename. Normally these are the same or very similar, but if this is not the case (for example a taskname has a space in it or is longer than 10 characters) then Alt-dragging will not work as intended. To overcome this, each time MenuBar is launched it looks in its application directory for a file called Names and builds a name translation table. By editing this textfile you can add items to the names translation table, up to a maximum of 30 names. The format is <filename>:<taskname><LF>.

Note that before the Risc PC (RO3.5), the name in the task manager had a maximum of 19 characters (e.g. Impression Publisher would be Impression Publishe), but from the Risc PC onwards the name can be longer (i.e. Impression Publisher). This Names file is currently set up for use on a Risc PC.

Menus

Add Menus

Choose All Menus -> Add Menu and an empty menu will be added at the right of the Menu bar. The bar is re-centred. If the screen resolution is such that the Menus will not all fit they are 'telescoped' intelligently so that you may still access each Menu. In this case, Menu titles are moved to the left to make them more visible. Clicking Select on a Menu brings it to the front, and choosing Back on All Menus rearranges the Menu bar. You cannot add more than ten Menus.

Name Menus

Each Menu can be given a more meaningful name. Click the menu button on the appropriate Menu and slide off the Menu name. Then slide off the Name item on the submenu to reveal a writable icon where you can edit the existing name, using up to twelve characters.

Remove Menus

Choose Remove from the appropriate menu and the Menu will be removed from the bar. Any gaps are closed and the menu bar is re-centred. After saving, only those Menus which remain will be loaded on the next occasion. It is not possible to remove the last Menu.

Move Menus

To reposition a Menu on the bar, hold down Alt and drag the sourcMenu handle, dropping the drag icon on the destination Menu. Any intermediate Menus are shunted along to make space. In case the handle is obscured, you can also drag the Menu by placing the pointer close to the its right-hand edge.

Open/Close/Front/Back Menus

The Menus may be opened, closed, moved to the front or moved to the back from the menu. The operation may be applied to the whole Menu bar or just a single Menu. Useful short-cuts are Ctrl-Select (to bring bar to the front) and Ctrl-Adjust (to send bar to the back). A single Menu may be opened by double-clicking Select on its handle, or closed by double-clicking Adjust. Or you can simply drag the handle. In case the handle is obscured, you can also drag the Menu by placing the pointer close to its the right-hand edge. A quick way to send the Bar to the back if it is obscuring a window's title bar is to click menu with the pointer at the very top of the screen.

Save Menus

Choose All Menus -> Save as data, and a data file called MenuData is saved within the MenuBar directory. This file is automatically loaded next time you run MenuBar. There is also an option to Save as text. Choose this to save a text file within the MenuBar directory storing the data as a readable text file - very useful if you ever need to re-create your Menus. (NB if you click with Adjust on Save as data the menu will remain open for you to click with Select on Save as text).

Sort Menus

As you add objects to a Menu, they are positioned in order from bottom to top. However, you may prefer to sort them by name or by type. This can be done for all Menus or just one, by clicking the menu button and making the appropriate choice. As with the Filer, sorting by name is alphabetical and sorting by type is in the order directories-applications-files. Under Choices you can set an option to cause automatic sorting whenever an object is added. Alternatively, you can arrange the objects in any order you choose by dragging (see Move object).

*IconSprites

If your Menus include applications which have not been seen by the Filer, the generic Application icon will be shown. Choosing *IconSprites from the menu causes the Boot files of applications to be run, thus displaying the correct icon. This may be done for all Menus or just one. Under Choices you can set an option to cause this to occur automatically when MenuBar is launched.

Choices

Choices is available from the lower section of the MenuBar menu and leads to a window in which you can automate IconSprites and sorting (default is off). Click Set to activate such changes with immediate effect or Save to save the settings in a Choices file for future use. Cancel closes the window leaving the previous settings intact. Clicking on Choices from the top level menu opens the window and closes the menu so that the dialogue box remains in place until you explicitly close it by clicking on one of the action buttons.

Miscellaneous

If you change mode, MenuBar automatically positions the Menus at the centre top of the screen. If the screen resolution is such that the Menus will not all fit they are 'telescoped' intelligently so that you may still access each Menu. In this case, Menu titles are moved to the left to make them more visible. Clicking Select on a Menu brings it to the front, and choosing All Menus -> Front tidies the Menu bar.

Note that copying is interactive if this is configured (use Configure), and that the options (Confirm, etc.) will be according to your settings. Also note that solid sprite dragging applies if your CMOS is appropriately configured (ie. bit 1 of byte 28 is set); otherwise 'rotating boxes' apply. A separate utility SolidDrag is included in the MenuBar directory to simplify the setting/unsetting of solid sprite dragging.

A summary of the Help file may be displayed from the main menu.

You are prevented from inadvertently running more than one copy of MenuBar at the same time. However, should you for some reason have a forced exit it is possible that you may get a MenuBar is already running message when it plainly is not. If this occurs, open the MenuBar directory, click on the Obey file Unset and try again.

MenuBar's own error/message window may be dragged with Select or Adjust when the pointer is on the body of the window.

There is a Public Domain program called LongFiles by Jason Tribbeck which allows filenames of up to 55 characters to be created. MenuBar is compatible with this utility, though naturally the filenames are truncated to fit into the Menus.

History

1.00 (15 Oct 1995)
First release for Acorn World show (27-29 October 1995)

1.01 (1 November 1995)
OpenWindow event in the Wimp poll loop confined to non-Menu windows thus allowing the menu bar to remain in place whichever area of the virtual desktop is selected in Julian Smith's excellent PD program MultiDesk.

1.02 (31 March 1997)
Version for RISC User Special Offer. Menu click at top of screen sends Bar to back. Minor improvements to templates, etc, suggested by Richard Hallas.

© Copyright Graham Crow 1995, 1997